﻿using Xunit;
using System.Collections.Generic;
using System.Linq;

namespace Gamemaster.Naming.Tests
{
    public class NamesGenerateTests
    {
        [Fact]
        [InjectDummyDatabase]
        public void CorrectNumberOfNames()
        {
            IEnumerable<Name> names = Names.Generate(10, GenderOptions.Female);

            Assert.Equal(10, names.Count());
        }

        [Fact]
        [InjectDummyDatabase]
        public void CorrectGenderForMaleOptions()
        {
            IEnumerable<Name> names = Names.Generate(10, GenderOptions.Male);

            Assert.False(names.Any(n => n.Gender == GenderOptions.Female));
        }

        [Fact]
        [InjectDummyDatabase]
        public void CorrectGenderForFemaleOptions()
        {
            IEnumerable<Name> names = Names.Generate(10, GenderOptions.Female);

            Assert.False(names.Any(n => n.Gender == GenderOptions.Male));
        }
    }
}
